package com.neutech.service.impl;

import com.neutech.mapper.ConfirmMapper;
import com.neutech.service.ConfirmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ConfirmServiceImpl implements ConfirmService {
    @Autowired
    private ConfirmMapper confirmMapper;
    @Override
    public List<Map<String ,Object>> queryConfirmByName(String name){
        return confirmMapper.queryConfirmByName(name);
    }

    @Override
    public List<Map<String, Object>> queryConfirmByIdnumber(Integer idnumber) {
        return confirmMapper.queryConfirmByIdnumber(idnumber);
    }

    @Override
    public void addConfirm(Map<String,Object> map){
        for(Object key:map.keySet()){
            Object value = map.get(key);
            map.put((String) key,value);
        }
        confirmMapper.addConfirm(map);

    }

    @Override
    public List<Map<String, Object>> queryConfirmList() {
        return confirmMapper.queryConfirmList();
    }
}
